<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>6-12 三列布局：右边自适应grid</title>
  <style>
    * {
      padding: 0;
      margin: 0;
      color: white;
    }

    .parent {
      width: 100%;
      height: 50px;
      /* 设置父级为栅格系统 */
      display: grid;
      grid-template-columns: 50px 80px auto;
    }

    .left {
      height: 80px;
      background: #c00;
    }

    .center {
      height: 100px;
      background: #00c;
    }

    .right {
      height: 150px;
      background: #0c0;
    }
  </style>
</head>

<body>
  <div class="parent">
    <div class="left">left...</div>
    <div class="center">center...</div>
    <div class="right">right...</div>
  </div>
</body>

</html>